home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d2 / pcwiz01.arc / SORT.INS < prev    next >
Text File  |  1991-08-22  |  3KB  |  83 lines

  1. SORT    Used to "FILTER" data contained in a file and
  2.         DISPLAY it on the screen in a rearranged format
  3.         (Format 1); to create a new file that contains
  4.         the same data as another file, only in SORTED
  5.         order (Format 2); or to display the output of
  6.         another command in a SORTed format when used
  7.         as a "PIPE" (Format 3).
  8.  
  9. Format: 1) SORT <[D:Path]FileSpec [/R] [/+Col]
  10.  
  11.         2) SORT <[D:Path]SFile >[D:Path]DFile [/R][/+C]
  12.  
  13.         3) COMMAND [Para] | SORT [/R] [/+Col]
  14.  
  15.   /R   sorts in REVERSE alphabetical order
  16.  
  17.   /+Col  causes the sorting to be based on the COLUMN
  18.          number specified.
  19. Example:          SORT < PHONES.TXT
  20.  
  21.    Displays the contents of the PHONES.TXT file in the
  22.    CURRENT directory in alpha-order on your screen.
  23.  
  24. Example:        SORT < \NOTES\PHONES.TXT /R
  25.  
  26.    Displays the contents of the PHONES.TXT file in the
  27.    \NOTES directory on the CURRENT drive in REVERSE
  28.    alpha-order on your screen.
  29.  
  30. Example:       SORT < PHONES.TXT > PHONES.SRT /+35
  31.  
  32.    Creates a new file named PHONE.SRT that contains the
  33.    same data as is in the source file named PHONES.TXT,
  34.    except the data is now in alpha-order based on the
  35.    character in column 35. (e.,g,. character 35 is the
  36.    beginning of the area code in the PHONE.TXT file.)
  37. Example:             DIR | SORT
  38.  
  39.    Displays a directory listing of the CURRENT directory
  40.    that is sorted in alphabetical order.
  41.  
  42. Example:         DIR \WP\*.TXT | SORT /+25
  43.  
  44.    Displays a directory listing of the \WP\*.TXT files
  45.    on the current drive that is sorted in alphabetical
  46.    order by file creation date.
  47.  
  48. Example:       DIR D:\WP | SORT /+9 >LPT1
  49.  
  50.    Sorts the \WP directory on drive D: according to
  51.    file extension (col 9) and sends the output directly
  52.    to your printer where it is immediately printed. (An
  53.    example of both PIPING "|" and REDIRECTION ">" in a
  54.    single operation!)
  55.  
  56. Example:      DIR D:\WP | SORT >WPSORT.LST
  57.  
  58.    Same as above, except directory is sorted according
  59.    to file name and the output is REDIRECTED to a NEW
  60.    file named WPSORT.LST in the CURRENT directory. This
  61.    file can later be displayed on the screen using the
  62.    TYPE command or be printed using the COPY command
  63.    with the >LPT1 redirection parameter.
  64.  
  65.  
  66. [*]  NEVER issued the SORT command WITHOUT specifying
  67.    parameters. A command of just "SORT" all by itself
  68.    will cause your computer to enter an endless loop.
  69.    If this accidentally happens, IMMEDIATELY shut-down
  70.    the system by either turning it off at the power
  71.    source or by using the "Alt-Ctrl-Del" sequence to
  72.    reset the system.
  73.  
  74. [*]  The sophisticated manipulations of file contents
  75.    you can perform using a combination of FILTERING,
  76.    REDIRECTION and PIPING is almost endless. Using the
  77.    basic formats and examples contained herein should
  78.    provide you with an understanding of how these
  79.    basic techniques work; and with a little "creative"
  80.    thinking and experimentation, you will begin to get
  81.    a real appreciation of just how "POWERFUL" the world
  82.    of DOS really is!
  83.